package cn.edu.zhku.citrusmonitor.baseinfo.technology.service;

import java.util.List;

import cn.edu.zhku.citrusmonitor.baseinfo.technology.exception.TechnologyException;
import cn.edu.zhku.citrusmonitor.domain.Bean;
import cn.edu.zhku.citrusmonitor.domain.TbTechnology;
import cn.edu.zhku.citrusmonitor.util.PageBean;

public interface TechnologyService {
	/**
	 * 添加技术信息
	 * @param technology
	 * @return
	 */
	boolean addTechnology(TbTechnology technology) throws TechnologyException;
	/**
	 * 修改技术信息
	 * @param technology
	 * @return
	 * @throws TechnologyException
	 */
	boolean modifyTechnology(TbTechnology technology) throws TechnologyException;
	/**
	 * 删除技术信息
	 * @param technologyId
	 * @return
	 * @throws TechnologyException
	 */
	boolean removeTechnology(String technologyId) throws TechnologyException;
	/**
	 * 根据id查询对应信息，返回TbTechnology
	 * @param technologyId
	 * @return
	 * @throws TechnologyException
	 */
	TbTechnology findTechnologyById(String technologyId) throws TechnologyException;
	/**
	 * 根据类别查出对应的信息
	 * @param category
	 * @return
	 */
	List<TbTechnology> findTechnologyByCategory(String category) throws TechnologyException;
	/**
	 * 分页查询所有，模糊查找
	 * @param pageSize
	 * @param currentPage
	 * @param condition
	 * @return
	 */
	PageBean<TbTechnology> findTechnologyByCategoryLike(int pageSize, int currentPage, String condition) throws TechnologyException;
	/**
	 * 分页查询所有技术信息
	 * @param parseInt
	 * @param parseInt2
	 * @return
	 */
	PageBean<TbTechnology> fySearchAll(int pageSize, int currentPage) throws TechnologyException;
	/**
	 * 根据类别查询最新的size条数据
	 * @param size
	 * @param category
	 * @return
	 * @throws TechnologyException
	 */
	List<TbTechnology> findTechnologyByCategoryLimit(int size, String category) throws TechnologyException ;
	/**
	 * 根据类别查询技术信息，提供给前台分页列表显示
	 * @param pageSize
	 * @param currentPage
	 * @return
	 */
	PageBean<Bean> findTechnologyPageByCategory(int pageSize, int currentPage, String category) throws TechnologyException;
	/**
	 * 根据id查询对应信息，返回Bean类
	 * @param technologyId
	 * @return
	 * @throws TechnologyException
	 */
	Bean getTechnologyById(String technologyId) throws TechnologyException;
	/**
	 * 批量删除
	 * @param ids
	 * @return
	 * @throws TechnologyException
	 */
	public boolean removeTechnologysByIds(String[] ids) throws TechnologyException;
}
